package com.authine.cloudpivot.ext.service;


import com.alibaba.cola.dto.SingleResponse;
import com.authine.cloudpivot.ext.dto.kingDee.request.RecordingVoucherManual;
import com.authine.cloudpivot.ext.dto.voucher.RecordVoucher;

import com.authine.cloudpivot.ext.kingdee.work.RecordVoucherWork;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;

import java.util.Collection;
import java.util.List;


@Slf4j
public class RecordVoucherService {

    private RecordVoucherWork recordVoucherWork = new RecordVoucherWork();


    public SingleResponse<String> saveRecordingVoucher( RecordingVoucherManual recordingVoucherManual){

        return  null;
    }

// 单表操作原生框架支持
//    @Path("pageRecordingVoucher")
//    @POST
//    @Operation(summary = "凭证列表",tags = CUSTOM_SERVICE)
//    public SingleResponse<List<RecordVoucher>> pageRecordingVoucher(@Parameter RecordingVoucherQuery query){
//
//        return null;
//    }


    public SingleResponse<List<RecordVoucher>> getVoucherByBusinessIds( Collection<String> businessIds){
        Assert.isTrue(!CollectionUtils.isEmpty(businessIds), "获取已生成凭证记录的数据 入参数据为空");

        return recordVoucherWork.getVoucherByBusinessIds(businessIds);
    }



}
